package {{package}};

{{#imports}}import {{import}};
{{/imports}}
import io.swagger.annotations.*;
{{#java8}}
import org.springframework.http.HttpStatus;
{{/java8}}
import {{wis-responseResultQualifiedName}};
{{#wis-containsComponentTag}}
import {{wis-componentDataQualifiedName}};{{/wis-containsComponentTag}}
import org.springframework.web.bind.annotation.*;
{{#async}}
import java.util.concurrent.{{^java8}}Callable{{/java8}}{{#java8}}CompletableFuture{{/java8}};{{/async}}
{{#wis-containsBodyParameter}}import javax.validation.Valid;
import org.springframework.validation.BindingResult;
{{/wis-containsBodyParameter}}

@Api(value = "{{{baseName}}}")
{{#operations}}
public interface {{classname}} {
{{#operation}}

    @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = ResponseResult.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
        {{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
            {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
            {{/hasMore}}{{/scopes}}
            }{{/isOAuth}}){{#hasMore}},
        {{/hasMore}}{{/authMethods}}
    }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMoreTag}}, {{/hasMoreTag}}{{/vendorExtensions.x-tags}} })
    @ApiResponses(value = { {{#responses}}
        @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = ResponseResult.class){{#hasMore}},{{/hasMore}}{{/responses}} })
    @RequestMapping(value = "{{{path}}}", method = RequestMethod.{{httpMethod}}{{#singleContentTypes}}, 
        produces = "{{{vendorExtensions.x-accepts}}}", consumes = "{{{vendorExtensions.x-contentType}}}"{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}, 
        produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }{{/hasProduces}}{{#hasConsumes}}, 
        consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }{{/hasConsumes}}{{/singleContentTypes}})
    {{#java8}}default {{/java8}}{{#async}}{{^java8}}Callable{{/java8}}{{#java8}}CompletableFuture<{{/java8}}{{/async}}ResponseResult<{{{returnType}}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
    	{{/hasMore}}{{/allParams}}){{^java8}};{{/java8}}{{#java8}} {
        // do some magic!
        return {{#async}}CompletableFuture.completedFuture({{/async}}ResponseResult<{{{returnType}}}>.success(){{#async}}){{/async}};
    }{{/java8}}

{{/operation}}
}
{{/operations}}
